package com.lepai.aop;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author weihaolong
 * @date 2019-04-29 11:50:00
 * @description
 */
@Component
@Aspect
public class AutoAspect {

    @Pointcut("execution(public * com.lepai.service.*.*(..))")
    public void executionPointcut(){}

    @Before("executionPointcut()")
    public void before(){
        System.out.println("基于注解的前置通知!!!");
    }

    @After("executionPointcut()")
    public void after(){
        System.out.println("基于注解的后置通知!!!");
    }
}
